From b3b619cabfe9ab46cc43da517b44280d9ce4ed4b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 29 Apr 2007 07:20:50 +0000 Subject: [PATCH] Only strip parentheses of the form (_x). (#434261, Brian Wellington) 2007-04-29 Matthias Clasen * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Only strip parentheses of the form (_x). (#434261, Brian Wellington) svn path=/trunk/; revision=17705 --- ChangeLog | 6 ++++++ gtk/gtktoolbar.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e58c476722..16c10278ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-29 Matthias Clasen + + * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): + Only strip parentheses of the form (_x). (#434261, + Brian Wellington) + 2007-04-29 Matthias Clasen * gtk/gtkprintoperation-unix.c diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 9fe1b84145..7f19352e69 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -4922,7 +4922,8 @@ _gtk_toolbar_elide_underscores (const gchar *original) else { last_underscore = FALSE; - if (*p != '_' && original + 2 <= p && p + 1 <= end && p[-2] == '(' && p[1] == ')') + if (original + 2 <= p && p + 1 <= end && + p[-2] == '(' && p[-1] == '_' && p[0] != '_' && p[1] == ')') { q--; *q = '\0'; -- 2.30.2